<!-- <p>pipe works!</p> -->
<h1>管道---过滤器</h1>
<h3>jsonPipe管道</h3>
<p>user:{{user}}</p>
<p>user:{{user | json}}</p>
<input type="text" [(ngModel)]="user.name">
<p [id]="user | json">将管道应用于属性</p>
<hr>
<h3>decimalPipe管道</h3>
<p>num:{{num}}</p>
<p>num:{{num | number}}</p>
<p>num:{{num | number:"1.4-5"}}</p>
<p>num:{{num | number:"1.4-4":"zh_Hans"}}</p>
<p>num1:{{num1}}</p>
<p>num1:{{num1 | number:"4.2-2"}}</p>
<p>num1:{{num1 | number:"4.2-2":"zh_Hans"}}</p>
<h3>日期时间管道</h3>
<p>date:{{date}}</p>
<p>date:{{date | date}}</p>
<p>date:{{date | date:"a"}}</p>
<p>date:{{date | date:"yyyy-MM-dd"}}</p>
<p>date:{{date | date:"hh:mm:ss a"}}</p>
<!-- 24小时制 -->
<p>date:{{date | date:"HH:mm:ss a"}}</p>
<p>date:{{date | date:"yyyy-MM-dd HH:mm:ss a"}}</p>
<p>date:{{date | date:"yyyy-MM-dd HH:mm:ss":"+0"}}</p>
<p>date:{{date | date:"yyyy-MM-dd HH:mm:ss":"+12"}}</p>
<p>date:{{date | date:"yyyy-MM-dd HH:mm:ss":"-12"}}</p>
<h3>自定义管道</h3>
<p>str:{{str}}</p>
<p>str:{{str | rep:"abc":"111"}}</p>